package org.geolatte.geom.json;

import java.util.HashMap;
import java.util.Map;

public class Settings {
    private final Map<Setting, Boolean> overrides = new HashMap();

    public boolean isSet(Setting setting) {
        Boolean override = (Boolean)this.overrides.get(setting);
        return override == null ? setting.isSetByDefault() : override;
    }

    public void override(Setting setting, boolean value) {
        if (setting.isSetByDefault() != value) {
            this.overrides.put(setting, value);
        }

    }
}
